home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010306-20010921 / 000083_news@columbia.edu_ 26 Apr 2001 15:04:18 GMT.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  2. Newsgroups: comp.os.linux.networking,comp.protocols.kermit.misc
  3. Subject: Re: copying a file to a ftp-server
  4. Date: 26 Apr 2001 15:04:18 GMT
  5. Organization: Columbia University
  6. Lines: 45
  7. Message-ID: <9c9ddi$i7f$1@newsmaster.cc.columbia.edu>
  8. References: <20010426.13080200@risa.athome> <9c9b2o$gej$1@newsmaster.cc.columbia.edu> <m3r8yfsovr.fsf@cc253090-a.sumt1.nj.home.com>
  9. NNTP-Posting-Host: watsun.cc.columbia.edu
  10. X-Trace: newsmaster.cc.columbia.edu 988297458 18671 128.59.39.2 (26 Apr 2001 15:04:18 GMT)
  11. X-Complaints-To: postmaster@columbia.edu
  12. NNTP-Posting-Date: 26 Apr 2001 15:04:18 GMT
  13. Xref: newsmaster.cc.columbia.edu comp.os.linux.networking:329856 comp.protocols.kermit.misc:12369
  14.  
  15. In article <m3r8yfsovr.fsf@cc253090-a.sumt1.nj.home.com>,
  16. Dan Espen  <dane@mk.telcordia.com> wrote:
  17. : fdc@watsun.cc.columbia.edu (Frank da Cruz) writes:
  18. : > In article <20010426.13080200@risa.athome>,
  19. : > <christian.verbeek@gmd.de> wrote:
  20. : > : how do i put a single file to a ftp server from the command line. With=20
  21. : > : the ftp program i always end up in interactive mode, but i want to do=20
  22. : > : this from within a script.
  23. : > : 
  24. : > : So i need something like: ftpcopy myfile ftp://myftpserver
  25. : > : 
  26. : > If you use the new Kermit FTP client:
  27. : Thats nice but not necessary.
  28. : Put the username and password in your .netrc.  You don't want
  29. : your password in a script, and its simpler that way.  Then do this:
  30. : (\
  31. : echo "put filename\n"\
  32. :  "close\n"\
  33. :  "quit\n"\
  34. : ) | ftp hostname
  35. There are two separate issues: How to put a file from the command line,
  36. and how to protect passwords.
  37.  
  38. If a particular FTP program lets you put files from the command line,
  39. that would seem to address the first issue better than editing files and
  40. stuffing echo commands into the standard input of a dumb ftp client,
  41. which might or might not work, depending on the client.
  42.  
  43. As for password safety, putting passwords in the .netrc file is no safer
  44. than putting them in scripts.  The only solution to this problem is to
  45. use secure authentication methods.  But the limiting factor in this case
  46. is whether a secure server is available on the other end.  At the moment,
  47. this is generally not the case.  But increasingly, it can be.  As noted
  48. previously, secure FTP servers are available:
  49.  
  50.   http://www.columbia.edu/kermit/ftpd.html
  51.  
  52. and as time goes on they will find their way into standard UNIX 
  53. distributions.
  54.  
  55. - Frank
  56.